<?php

$knoppen = $this->getData('knoppen');

$balk = '';
if (isset($knoppen['links']) && count($knoppen['links']) > 0) {
    $balkLinks  = '<div class="pull-left">';
    foreach($knoppen['links'] as $knop) {
        $balkLinks .= <<<EOD
            <button id="{$knop['id']}" 
                    name="{$knop['id']}" 
                    type="button" 
                    class="btn {$knop['class']}">
                        <span class="glyphicon {$knop['glyph']}"></span>
                        &nbsp;{$knop['tekst']}
            </button>
EOD;
    }
    $balkLinks .= '</div>';
    $balk .= $balkLinks;
}

if (isset($knoppen['rechts']) && count($knoppen['rechts']) > 0) {
    $balkRechts  = '<div class="pull-right">';
    foreach($knoppen['rechts'] as $knop) {
        $balkRechts .= <<<EOD
            <button id="{$knop['id']}" 
                    name="{$knop['id']}" 
                    type="button" 
                    class="btn {$knop['class']}">
                        <span class="glyphicon {$knop['glyph']}"></span>
                        &nbsp;{$knop['tekst']}
            </button>
EOD;
    }
    $balkRechts .= '</div>';
    $balk .= $balkRechts;
}

\Weergave::SETWEERGAVE('actiebalk',$balk);